<?php
include_once '../includes/common.php';
$proid=daddslashes($_GET['proid']);
$url=daddslashes($_GET['url']);
$program = $DB->get_row("SELECT * FROM authguao_program WHERE id='$proid' limit 1");
$payrow = $DB->get_row("SELECT * FROM authguao_paysite WHERE proid='$proid' and url='$url' limit 1");
if($url == "127.0.0.1" || $url == "localhost");
if (!$program) {
    $result=array('code'=>2);
} else if ($program['active'] == 0) {
    $result=array('code'=>2);
} else {
    if ($program && $payrow && $payrow['active'] == 1) {
        $result=array('code'=>1);
    } else {
        $result=array('code'=>2);
    }
}
echo json_encode($result);
$DB->close();
?>